package com.jyx.refactor.beginner.service.impl;

import com.jyx.refactor.beginner.Movie;
import com.jyx.refactor.beginner.service.Price;

public class RegularPrice extends Price {

	public int getPriceCode() {
			return Movie.REGULAR;
	}
	
	public double calcAmount(int daysRented) {
		double amount = 2;
		if(daysRented > 2)
			amount += (daysRented - 2) * 1.5;
		return amount;
	}

}
